package com.spring.starter.aspectJ;

import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author tonywang
 * @date 6/15/2018
 */
@Aspect
public class CriticAspectFB {
    @Pointcut("execution(* com.spring.starter.aspectJ.Performance.perform(..))")
    public void perform(){}
    @AfterReturning("perform()")
    public void performance(){
        System.out.println(criticismEngine.getCriticism());
    }
    public CriticismEngine criticismEngine;

    public void setCriticismEngine(CriticismEngine criticismEngine) {
        this.criticismEngine = criticismEngine;
    }
}

